<?php

class Workset_Controller_Action_Helper_Url extends Zend_Controller_Action_Helper_Url {

    private static $_urlParams = array(
        'action' => null,
        'controller' => null,
        'module' => null,
        'params' => null
    );

	function simple($action, $controller = null, $module = null, array $params = null) {

        if (is_array($action)) {
            $urlParams = array_merge(self::$_urlParams, $action);
            $action = $urlParams['action'];
            $controller = $urlParams['controller'];
            $module = $urlParams['module'];
            $params = $urlParams['params'];
        }

        $url = parent::simple($action, $controller, $module);
        if (is_array($params)) {
            $url .= '?'.http_build_query($params);
        }
        return $url;
    }
	
	function direct($action, $controller = null, $module = null, array $params = null) {
		return $this->simple($action, $controller, $module, $params);
	}

}

?>